//
//  LSYNetBookCell.m
//  LSYReader
//
//  Created by sam on 2018/3/29.
//  Copyright © 2018年 okwei. All rights reserved.
//

#import "UIImageView+WebCache.h"

#import "LSYNetBookCell.h"
@interface LSYNetBookCell()
@property (nonatomic,strong) IBOutlet UILabel *titleLabel;
@property (nonatomic,strong) IBOutlet UILabel *authorLabel;
@property (nonatomic,strong) IBOutlet UILabel *descLabel;
@property (nonatomic,strong) IBOutlet UILabel *typeLabel;
@property (nonatomic,strong) IBOutlet UILabel *updateLabel;
@property (nonatomic,strong) IBOutlet UIImageView *coverImageView;

@property (nonatomic,strong) LSYBook *book;
@end

@implementation LSYNetBookCell

- (void)setBook:(LSYBook *)book {
    if ([_book isEqual:book]) {
        return;
    }
    _book = book;
    _titleLabel.text = _book.bookName;
    _authorLabel.text = _book.bookAuthor;
    _typeLabel.text = _book.bookCategory;
    _descLabel.text = _book.bookDesc;
    _updateLabel.text = _book.bookUpdateTime?:@"--";
    [_coverImageView sd_setImageWithURL:[NSURL URLWithString:_book.bookIcon] placeholderImage:[UIImage imageNamed:@"ic_book_cover"]];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
